package io.renren.modules.member.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.member.entity.MemberEntity;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface MemberDao extends BaseMapper<MemberEntity> {

    @Select("SELECT " + MemberEntity.SQL_COLUMN + " FROM steel_member t WHERE t.student_code = #{studentCode} LIMIT 1 ")
    MemberEntity findByStudentCode(@Param("studentCode") String studentCode);

    @Select("SELECT " + MemberEntity.SQL_COLUMN + " FROM steel_member t WHERE t.ic_code = #{icCode} ")
    List<MemberEntity> findByIcCode(@Param("icCode") String icCode);
}
